home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / GLUT / Glut.cf < prev    next >
Text File  |  1996-11-11  |  4KB  |  116 lines

  1. XCOMM Copyright (c) Mark J. Kilgard, 1994.
  2. XCOMM Glut.cf - GLUT distribution Imakefile configuration info
  3.  
  4. #ifndef MathLibrary /* introduced with X11R6 */
  5. #define MathLibrary -lm
  6. #endif
  7.  
  8. #ifndef SaberProgramTarget /* in X11R5 but removed in X11R6 */
  9. #define SaberProgramTarget(program,srclist,objlist,locallibs,syslibs)
  10. #endif
  11.  
  12. #ifdef SunArchitecture
  13.  
  14. /*
  15.  * Solaris has a non-standard way of placing libraries
  16.  * and header files.  This should work for Template Graphics Systems'
  17.  * OpenGL implementation, assuming your OGLHOME and OPENWINHOME
  18.  * environment variables are set correctly.
  19.  */
  20. EXTRA_INCLUDES = -I$(TOP) -I$(OGLHOME)/include -I$(OPENWINHOME)/include
  21. OPENGL = -L$(OGLHOME)/lib -lGL -L$(OPENWINHOME) -ldga
  22. GLU = -L$(OGLHOME)/lib -lGLU
  23. /* XXX Is this right, Template?? */
  24. INVENTOR = -L$(OGLHOME)/lib -lInventor
  25. UCBLIB = /usr/ucblib/libucb.a
  26. GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
  27. GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary $(UCBLIB)
  28.  
  29. #else /* Everybody but Sun... */
  30. #ifdef AlphaArchitecture
  31.  
  32. /*
  33.  * Digital puts all Imake symbols for use with OpenGL in OpenGL.tmpl, so use
  34.  * the contents of that file instead of the definitions here.
  35.  */
  36.  
  37. #include <OpenGL.tmpl>
  38.  
  39. EXTRA_INCLUDES = GLUTInclude
  40. INVENTOR = -lInventor
  41.  
  42. GLUT_LIBS =       $(GLUTLIB)    $(GLULIB)    $(GLLIB)    $(XMULIB) $(XILIB) $(XLIB) MathLibrary
  43. GLUT_DEPLIBS = $(DEPGLUTLIB) $(DEPGLULIB) $(DEPGLLIB) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
  44.  
  45. #else /* Everybody but Sun or DEC Alpha... */
  46.  
  47. /*
  48.  * This should work for normal vendors that put their OpenGL and X
  49.  * libraries and headers in standard places (or at least where
  50.  * imake configuration files know where they are).
  51.  */
  52.  
  53. #ifdef HPArchitecture
  54. /* Nate Robbins (E&S) reports that HP does not have its Xmu.h header in
  55.    the standard place. */
  56. XMU_HEADERS = /usr/contrib/X11R5/include/
  57. EXTRA_INCLUDES = -I$(TOP) -I$(XMU_HEADERS)
  58. #else
  59. EXTRA_INCLUDES = -I$(TOP)
  60. #endif
  61.  
  62. GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXLIB)
  63. GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XLIB) MathLibrary
  64. OPENGL = -lGL
  65. GLU = -lGLU
  66. INVENTOR = -lInventor
  67. GLUT_DEPLIBS = $(DEPGLUT) $(DEPXMULIB) $(DEPXILIB) $(DEPXLIB)
  68. GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XILIB) $(XLIB) MathLibrary
  69.  
  70. #endif
  71. #endif
  72.  
  73. #ifndef AlphaArchitecture
  74. DEPGLUT = $(TOP)/lib/glut/libglut.a
  75. GLUT = $(TOP)/lib/glut/libglut.a
  76. #endif
  77.  
  78. CXXEXTRA_INCLUDES = -I/usr/include/CC $(EXTRA_INCLUDES)
  79. GLUT_INVENTOR_DEPLIBS = $(GLUT_DEPLIBS)
  80. GLUT_INVENTOR_LIBS = $(INVENTOR) $(GLUT_LIBS)
  81.  
  82. #ifdef SGIArchitecture
  83. /* For SGI C++ compiler, need to search extra dirs in make depend */
  84. #undef CplusplusDependIncludes
  85. #define CplusplusDependIncludes -I$(ROOT)/usr/include/CC
  86. #endif
  87.  
  88. #ifdef SGIArchitecture
  89. /* 
  90.  * SGI has a malloc library that allows extra debugging checks
  91.  * to be made by malloc if mallopt(M_DEBUG,1) is called; this is
  92.  * used to detect malloc problems in the GLUT tests.
  93.  */
  94. DEBUG_MALLOC = -lmalloc
  95. #else
  96. DEBUG_MALLOC =
  97. #endif
  98.  
  99. #ifndef NullParameter
  100. /*
  101.  * NullParameter should be #define'ed to nothing in Imake.rules, but it has
  102.  * been reported to me that this is not always the case.  If not, let
  103.  * Glut.cf #define it to nothing.
  104.  */
  105. #define NullParameter
  106. #endif
  107.  
  108. #define GlutTestProgramTarget(name) NormalProgramTarget(name,name.o,$(GLUT_DEPLIBS),$(GLUT_LIBS),$(DEBUG_MALLOC))
  109. #define SimpleGlutProgramTarget(name) NormalProgramTarget(name,name.o,$(GLUT_DEPLIBS),$(GLUT_LIBS),NullParameter)
  110. #define NormalGlutProgramTarget(name,objs) NormalProgramTarget(name,objs,$(GLUT_DEPLIBS),$(GLUT_LIBS),NullParameter)
  111. #define SimpleGlutInventorProgramTarget(name) NormalCplusplusProgramTarget(name,name.o,$(GLUT_INVENTOR_DEPLIBS),$(GLUT_INVENTOR_LIBS),NullParameter)
  112. #define NormalGlutInventorProgramTarget(name,objs) NormalCplusplusProgramTarget(name,objs,$(GLUT_INVENTOR_DEPLIBS),$(GLUT_INVENTOR_LIBS),NullParameter)
  113.  
  114. XCOMM end Glut.cf - GLUT distribution Imakefile configuration info
  115.  
  116.